package view;

import pojo.car;
import pojo.user;

import javax.sound.midi.Soundbank;
import java.util.Scanner;

public class Window {
    Scanner sc = new Scanner(System.in);
    public user insertView(){
        System.out.println("请输入您的用户名：");
        String username = sc.next();
        System.out.println("请输入您的密码：");
        String password = sc.next();
        return new user(0,username,password,1);
    }
    public void begin(){
        System.out.println("*******欢迎使用汽车管理系统*********");
        System.out.println("请选择");
        System.out.println("1.查询服务");
        System.out.println("2.添加车辆");
        System.out.println("3.修改车辆");
        System.out.println("4.删除车辆");
        System.out.println("5.汽车列表");
        System.out.println("6.退出程序");
    }
    public car insertView1(){
        System.out.println("请输入您的车牌：");
        String username = sc.next();
        System.out.println("请输入您的车的类型：");
        String password = sc.next();
        return new car(0,username,password,1,0);
    }
    public car update()
    {
        System.out.println("请输入您的车牌：");
        String user = sc.next();
        System.out.println("请输入您的的车是否维修：");
        int pw = Integer.parseInt(sc.next());
        return new car(0, user, "", 1,pw);
    }
    public car delete(){
        System.out.println("请输入需要删除的车牌号码：");
        String number=sc.next();
        return new car(0,number,"",1,1);
    }
    public String select(){
        System.out.println("请输入需要查询的车牌号");
        String number=sc.next();
        return number;
    }
}
